﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.CUiFLEXCableSettingsCmd
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using DnProcessSimulateCommands.Flexibles;
using System;
using System.Resources;
using System.Windows;
using Tecnomatix.Engineering;


namespace DnProcessSimulateCommands;

[TxPowerEngineeringCommandCategory]
public class CUiFLEXCableSettingsCmd : TxButtonCommand
{
  private CUiFLEXCableSettingsWindow _window;

  public virtual void Execute(object cmdParams)
  {
    if (this._window == null)
    {
      this.OpenDialog();
      ((Window) this._window).Closed += new EventHandler(this._window_Closed);
    }
    ((Window) this._window).Show();
    ((UIElement) this._window).InvalidateVisual();
  }

  private void OpenDialog() => this._window = new CUiFLEXCableSettingsWindow(this);

  private void _window_Closed(object sender, EventArgs e)
  {
    this._window = (CUiFLEXCableSettingsWindow) null;
  }

  public virtual ITxImage Image => (ITxImage) Images.CableSettingsCmdIcon;

  public virtual string Category
  {
    get
    {
      return new ResourceManager("DnProcessSimulateCommands.StringTable", ((object) this).GetType().Assembly).GetString("CREATE_CABLES_CATEGORY");
    }
  }

  public virtual string Name
  {
    get
    {
      return new ResourceManager("DnProcessSimulateCommands.StringTable", ((object) this).GetType().Assembly).GetString("CABLE_SETTINGS_NAME");
    }
  }

  public virtual string Bitmap
  {
    get
    {
      return new ResourceManager("DnProcessSimulateCommands.StringTable", ((object) this).GetType().Assembly).GetString("CABLE_SETTINGS_BITMAP");
    }
  }

  public virtual string Tooltip
  {
    get
    {
      return new ResourceManager("DnProcessSimulateCommands.StringTable", ((object) this).GetType().Assembly).GetString("CABLE_SETTINGS_TOOLTIP");
    }
  }

  public virtual string Description
  {
    get
    {
      return new ResourceManager("DnProcessSimulateCommands.StringTable", ((object) this).GetType().Assembly).GetString("EDITOR_CABLES_DESCRIPTION");
    }
  }

  public virtual string LargeBitmap
  {
    get
    {
      return new ResourceManager("DnProcessSimulateCommands.StringTable", ((object) this).GetType().Assembly).GetString("CABLE_SETTINGS_BITMAP_LARGE");
    }
  }

  public virtual bool Connect() => true;

  public virtual ITxCommandEnabler CommandEnabler => (ITxCommandEnabler) null;
}
